public class demo4 {
    public static void main(String[] args) {
      double S1=san(2,3);
        System.out.println("三角形面积为:"+S1);
        double S2=chang(4,5);
        System.out.println("长方形的面积为:"+S2);
        double S3=zheng(5);
        System.out.println("正方形的面积为:"+S3);
    }
    public static double san(double a, double b){
         return a*b/2;
    }
    public static double chang(double c,double d){
        return  c*d;
    }
    public static double zheng(double f){
        return f*f;
    }
}
